package ch.kerbtier.malurus.operations;

import ch.kerbtier.malurus.Visitor;
import ch.kerbtier.malurus.Component;
import ch.kerbtier.malurus.CompositeComponent;
import ch.kerbtier.malurus.coreimpl.CiComponent;
import ch.kerbtier.malurus.coreimpl.CiCompositeComponent;

public class CiResetVisitor implements Visitor {
	public void visit(Component component) {
		((CiComponent) component).setModified(false);
	}

	public void visit(CompositeComponent compositeComponent) {
		((CiComponent) compositeComponent).setModified(false);
		((CiCompositeComponent) compositeComponent).setChangedStructure(false);
		for (Component c : compositeComponent) {
			c.acceptVisitor(this);
		}
	}
}
